import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesScanRecord/export`;
// 分页查询
export function getList(params = {}) {
  return request({
    url: `${mesUrl}mesScanRecord`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate(data = {}) {
  return request({
    url: `${mesUrl}mesScanRecord`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate(data = {}) {
  return request({
    url: `${mesUrl}mesScanRecord`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel(id) {
  return request({
    url: `${mesUrl}mesScanRecord/${id}`,
    method: "put",
  });
}
// 详情
export function rowDetail(id) {
  return request({
    url: `${mesUrl}mesScanRecord/info/${id}`,
    method: "get",
  });
}
export function getCheckResultList() {
  return request({
    url: `${adminUrl}dict/type/check_result`,
    method: "get",
  });
}
// 查询生产线体编码列表
export function getLineCodeList(params) {
  return request({
    url: `${adminUrl}baseFactoryModeling/children`,
    method: "get",
    params,
  });
}
// 查询生产工序编码列表
export function getProductProcessCodeList() {
  return request({
    url: `${mesUrl}mesProcess/list`,
    method: "get",
  });
}
// 查询采集工位编码列表
export function getWorkCellCodeList() {
  return request({
    url: `${adminUrl}baseFactoryModeling/children`,
    method: "get",
  });
}
// 查询采集班组编码列表
export function getWorkTeamCodeList() {
  return request({
    url: `${mesUrl}mesTeam/list`,
    method: "get",
  });
}
// 查询扫描人员编码列表
export function getUserCodeList() {
  return request({
    url: `${adminUrl}dict/type/prod_order_type`,
    method: "get",
  });
}
// 查询虚实订单类型列表
export function getSimulatedTypeList() {
  return request({
    url: `${adminUrl}dict/type/simulated_type`,
    method: "get",
  });
}
// 查询生产订单类型列表
export function getProdOrderTypeList() {
  return request({
    url: `${adminUrl}dict/type/prod_order_type`,
    method: "get",
  });
}
// 查询BOM配方版本号列表
export function getBomVersionNumberList() {
  return request({
    url: `${adminUrl}dict/type/prod_order_type`,
    method: "get",
  });
}
// 查询工序属性：过站（默认）、检验、返修列表
export function getProcessPropertyList() {
  return request({
    url: `${adminUrl}dict/type/process_property`,
    method: "get",
  });
}
